﻿using Microsoft.Phone.Controls;

namespace Budgetsch.WP7.View
{
    using System;

    using Budgetsch.WP7.ViewModel.Cost;
    using Budgetsch.WP7.ViewModel.Income;

    /// <summary>
    /// Description for CostDetailsView.
    /// </summary>
    public partial class CostDetailsView
    {
        /// <summary>
        /// Initializes a new instance of the CostDetailsView class.
        /// </summary>
        public CostDetailsView()
        {
            InitializeComponent();
        }

        private void AddCommentAppButton_Click(object sender, EventArgs e)
        {
            var vm = DataContext as CostDetailsViewModel;
            if (vm != null)
            {
                NavigationService.Navigate(new Uri("/View/CommentWriterView.xaml?type=cost&itemid=" + vm.Cost.ID, UriKind.Relative));
            }
        }
    }
}